﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html"; charset="utf-8" />
<title>客房情况</title>
<link href="/xiaozu/css/main.css" rel="stylesheet" type="text/css">
    <link href="/xiaozu/bstable/css/bootstrap.min.css" rel="stylesheet" type="text/css">
    <link href="/xiaozu/bstable/css/bootstrap-table.css" rel="stylesheet" type="text/css">

</head>
<body>
<div class="tabe_div">
    <form action="${pageContext.request.contextPath }/tickets/Search" method="post">
    <p class="p_line text_ient"><a class="find_a">名称：</a><input type="text" name="ticket_Name" class="form_input text_ient" placeholder="输入关键字或全称" value="${ticket_Name}"/>
    <a  class="find_a">类型：</a>
    <select class="form_select" style="padding-left: 1%;">
        <option>全部</option>
        <option>价格</option>
        <option>服务</option>
        <option>管理</option>
        <option>其他</option>
    </select>
    <a class="find_a">时间：</a><input type="text" class="form_input text_ient" style="width: 80px;"/>—&nbsp;<input type="text" class="form_input text_ient" style="width: 80px;"/>
    <input type="submit" value="查询" class="but_find"/><p>
    </form>
    <p class="p_table">
    <a href="#" class="a_add">全部导出</a>
</p>
    <table id="table" class="table_style" style="margin: 0 auto" >
        <%--此处用c标签遍历--%>
        <c:forEach items="${list}" var="t">
            <tr>
                <td>${t.at_ticket_Id}</td>
                <td>${t.at_ticket_Name}</td>
                <td>${t.at_ticket_Grade}</td>
                <td>${t.at_ticket_Votes}</td>
                <td>${t.at_ticket_Group}</td>
                <td>${t.at_ticket_Turnover}</td>
                <td>${t.at_ticket_Phone}</td>
                <td>${t.at_ticket_Remarks}</td>
            </tr>
        </c:forEach>


    </table>





</div>
<div></div>
<script src="/xiaozu/js/jquery.js"></script>
<script src="/xiaozu/js/date/js/laydate.js"></script>
<script src="/xiaozu/bstable/js/bootstrap.min.js"></script>
<script src="/xiaozu/bstable/js/bootstrap-table.js"></script>
<script src="/xiaozu/bstable/js/bootstrap-table-zh-CN.min.js"></script>
<script>
    !function () {
        laydate.skin('danlan'); //切换皮肤，请查看skins下面皮肤库
        laydate({ elem: '#demo' });
        laydate({ elem: '#demo1' }); //绑定元素
    } ();
</script>

<script type="text/javascript">
    $(function () {
        $('#table')
            .bootstrapTable({
                method: "get",
                striped: true,
                singleSelect: false,
                url: "/xiaozu/json/ticketsTradingSearch.json",
                dataType: "json",
                pagination: true, //分页
                pageSize: 10,
                pageNumber: 1,
                search: false, //显示搜索框
                contentType: "application/x-www-form-urlencoded",
                queryParams: null,
                columns: [
                    {
                        title: "序号",
                        field: 'id',
                        align: 'center',
                        valign: 'middle'
                    },
                    {
                        title: '景点名称',
                        field: 'name',
                        align: 'center',
                        valign: 'middle'
                    },
                    {
                        title: '等级',
                        field: 'type',
                        align: 'center'
                    },
                    {
                        title: '售出总票数(张)',
                        field: 'ticktsNumber',
                        align: 'center'
                    },
                    {
                        title: '售出团购票数(张)',
                        field: 'tgTicktsNumber',
                        align: 'center'
                    },
                    {
                        title: '交易额(元)',
                        field: 'much',
                        align: 'center'
                    },
                    {
                        title: '联系电话（景点）',
                        field: 'phone',
                        align: 'center'
                    },
                    {
                        title: '交易备注',
                        field: 'note',
                        align: 'center'
                    }
                ]
            });
    });

    function addHotel() {
        this.location.href = "addHotel.jsp";
    }

    function editHotel(id) {
        this.location.href = "editHotel.jsp";
    }

</script>
<script src="/xiaozu/layer_v2.1/layer/layer.js"></script>
<script type="text/javascript">
    function openlayer(id) {
        layer.open({
            type: 2,
            title: '添加酒店信息',
            shadeClose: true,
            shade: 0.5,
            skin: 'layui-layer-rim',
            //            maxmin: true,
            closeBtn: 1,
            area: ['80%', '75%'],
            shadeClose: true,
            closeBtn: 1,
            content: 'addHotel.jsp'
            //iframe的url
        });
    }

    //    function editHotel(id) {
    //        layer.open({
    //            type: 2,
    //            title: '酒店信息',
    //            shadeClose: true,
    //            shade: 0.5,
    //            skin: 'layui-layer-rim',
    //            //            maxmin: true,
    //            closeBtn: 1,
    //            area: ['80%', '75%'],
    //            shadeClose: true,
    //            closeBtn: 1,
    //            content: 'editHotel.html'
    //            //iframe的url
    //        });
    //    }

    function deleteHotel(dom) {
        alert("删除成功");
        $(dom).parent().parent().remove();
    }

    function showHotelInfo(id) {
        layer.open({
            type: 2,
            title: '酒店信息',
            shadeClose: true,
            shade: 0.5,
            skin: 'layui-layer-rim',
            //            maxmin: true,
            closeBtn: 1,
            area: ['80%', '75%'],
            shadeClose: true,
            closeBtn: 1,
            content: 'hotelInfo.jsp'
            //iframe的url
        });
    }
</script>
</body>
</html>
